package oo

const (
	LevelBronze    int = 0
	LevelSilver    int = 10
	LevelGold      int = 20
	LevelPlatinum  int = 30
	LevelBlackGold int = 40
)

var LevelDescMapping = map[int]string{
	LevelBronze:    "青铜",
	LevelSilver:    "白银",
	LevelGold:      "黄金",
	LevelPlatinum:  "铂金",
	LevelBlackGold: "黑金",
}

type Level struct {
	Int
}

func (o *Level) IsValid() bool {
	_, ok := LevelDescMapping[o.value]
	return ok
}

func (o *Level) Desc() string {
	return LevelDescMapping[o.value]
}
